const express = require('express');
const router = express.Router();
const { 
  createMemberCard,
  getMemberCards,
  getMemberCardById,
  updateMemberCard,
  deleteMemberCard,
  rechargeCard,
  consumeCard,
  getCardTransactions,
  getMemberCardsByCustomerId
} = require('../controllers/memberCardController');

// 创建会员卡
router.post('/create', createMemberCard);

// 获取会员卡列表
router.post('/list', getMemberCards);

// 获取会员卡详情
router.post('/detail', getMemberCardById);

// 更新会员卡
router.post('/update', updateMemberCard);

// 删除会员卡
router.post('/delete', deleteMemberCard);

// 会员卡充值
router.post('/recharge', rechargeCard);

// 会员卡消费
router.post('/consume', consumeCard);

// 获取交易记录
router.post('/transactions', getCardTransactions);

// 通过客户ID获取会员卡列表
router.post('/customer-cards', getMemberCardsByCustomerId);

module.exports = router;